package com.xcl.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

@Configuration
public class SecurityConfig {

    //配置加密器
    @Bean
    public BCryptPasswordEncoder getPasswordEncoder() {
        //指定加密的强度  4-31  默认强度10
        return new BCryptPasswordEncoder(12);
    }
}
